const { checkTokenUser } = require("../middleware/jwt");
const userComment = require("../controllers/comment");
module.exports = (app) => {
  // 权限管理 需要注册中间件
  app.use("/user/comment/more", checkTokenUser);
  // 评论增删改查
  app.post("/user/comment/more", userComment.createComment);
  app.delete("/user/comment/more/:id", userComment.deleteComment);
  app.put("/user/comment/more/:id", userComment.updateComment);
  app.get("/user/comment", userComment.getAllComments);
};
